<nz-modal [(nzVisible)]="isVisible" nzTitle="修改密码" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzWidth]="390" [nzOkLoading]="loading">

    <ng-container *nzModalContent>
        <form nz-form [formGroup]="form" [nzLayout]="'horizontal'">
            <nz-form-item>
                <nz-form-label nzRequired [nzSpan]="7">原密码</nz-form-label>
                <nz-form-control nzErrorTip="原密码必填" [nzSpan]="14">
                    <input nz-input formControlName="fOldPassword" type="text" class="pwd" autocomplete="off" (input)="oldPwdChange($event)" onpaste="return false" ondrop="return false" oncontextmenu="return false" oncut="return false" oncopy="return false" onkeyup="value=value.replace(/[^\u0000-\u00FF]/g,'')">
                </nz-form-control>
            </nz-form-item>
            <nz-form-item>
                <nz-form-label nzRequired [nzSpan]="7">新密码</nz-form-label>
                <nz-form-control [nzSpan]="14" [nzErrorTip]="passwordErrorTpl">
                    <input nz-input formControlName="fPassword" type="text" class="pwd" autocomplete="off" (ngModelChange)="newPwdChange($event)" ng-minlength="6" onpaste="return false" ondrop="return false" oncontextmenu="return false" oncut="return false" oncopy="return false"
                        onkeyup="value=value.replace(/[^\u0000-\u00FF]/g,'')">
                    <ng-template #passwordErrorTpl>
                        <ng-container *ngIf="fPassword.dirty && fPassword.errors?.required">必填</ng-container>
                        <ng-container *ngIf="fPassword.dirty && fPassword.errors?.minlength">最少6个字符</ng-container>
                        <ng-container *ngIf="fPassword.dirty && fPassword.errors?.maxlength">最多16个字符</ng-container>
                        <ng-container *ngIf="fPassword.dirty && fPassword.errors?.same">新密码跟原密码不能相同</ng-container>
                    </ng-template>
                </nz-form-control>
                <nz-form-label [nzSpan]="3" [nzNoColon]="true"><span [style.color]="levelColor">{{passwordLevel}}</span>
                </nz-form-label>
            </nz-form-item>
            <nz-form-item>
                <nz-form-label nzRequired [nzSpan]="7">重复新密码</nz-form-label>
                <nz-form-control [nzSpan]="14" [nzErrorTip]="repasswordErrorTpl">
                    <input nz-input formControlName="fRePassword" type="text" class="pwd" autocomplete="off" ng-minlength="6" onpaste="return false" ondrop="return false" oncontextmenu="return false" oncut="return false" oncopy="return false" onkeyup="value=value.replace(/[^\u0000-\u00FF]/g,'')">
                    <ng-template #repasswordErrorTpl>
                        <ng-container *ngIf="fRePassword.dirty && fRePassword.errors?.required">必填</ng-container>
                        <ng-container *ngIf="fRePassword.dirty && fRePassword.errors?.notEqual">密码不一致</ng-container>
                    </ng-template>
                </nz-form-control>

            </nz-form-item>
        </form>
    </ng-container>
</nz-modal>